
<%@ page language="java" contentType="text/html" pageEncoding="utf-8"%>
<%@ page import="com.visualexpress.domain.*,com.visualexpress.dao.*,java.util.*"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<s:include value="admin_header.jsp" />
<s:actionmessage/>
订单号:
<strong>
  <s:property value="#session.admin_shipment.shipmentNum" />
</strong>
<%Shipment shipment = (Shipment)session.getAttribute("admin_shipment"); %>
<br/>

起始城市：    <%=shipment.getStartLocation().getSite().getName()+"   站点"+  shipment.getStartLocation().getName() %>
<br/>

目的城市：   <%=shipment.getEndLocation().getSite().getName()+"站点"+  shipment.getEndLocation().getName() %>
<br/>
<div>
							
							<%
								List<TimeLocation> timeLocations = (List<TimeLocation>)new TimeLocationDAO().findByShipment(shipment);
							%>
										<table width="560" height="80" border="0" align="center"
											cellpadding="0" cellspacing="0">
											<tr>
												<td align="center" class="td-tt1" width="150">
													处 理 时 间
												</td>
												<td align="center" class="td-tt1">
													处 理 地 点
												</td>
												<td width="150" align="center" class="td-tt1">
													邮 件 状 态
												</td>
											</tr>

											<%
												for (int i = 0; i < timeLocations.size(); i++) {
											%>

											<tr align="center">
												<td class="td-main1" align="center" width="150">
													<%SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");%>
													<%String str = sdf.format(timeLocations.get(i).getArrivalTime());%>
													<%=str%>
												</td>
												<td class="td-main1" align="center">
													<%=timeLocations.get(i).getLocation()%>
												</td>
												<td align="center" class="td-main1">
													收寄&nbsp;&nbsp;
												</td>
											</tr>
											<tr align="center">
												<td class="td-main2" align="center" width="150">
										
													<%String str2 = sdf.format(timeLocations.get(i).getLeaveTime());%>
													<%=str2%>
												</td>
												<td class="td-main2" align="center">
													<%=timeLocations.get(i).getLocation()%>
												</td>
												<td align="center" class="td-main2">
												<%if(timeLocations.get(i).getLocation().getName().equals(shipment.getEndLocation().getName())){%>
													妥投
												<%}else {%>
													离开
												</td>
											</tr>
											<%
												}}
											%>
										</table>
									</td>
								</tr>
							</table>
						</div>
<s:form action="addPassbyCity" theme="simple">
	途经城市:<s:textfield name="city" label="途经城市" /><br>
	到达时间:<s:textfield name="arriveYear" label="到达年份" size="4"/>年
	<s:select label="到达月份"
		list="#{'1','2','3','4','5','6','7','8','9','10','11','12'}"
		name="arriveMonth" multiple="false" listKey="key" listValue="key" />月
	<s:textfield name="arriveDay" label="到达日" size="2"/>日
	<s:textfield name="arriveHour" label="到达小时" size="2"/>时<br/>
	
	离开时间:	<s:textfield name="leaveYear" label="离开年份" size="4" />年	
	<s:select label="离开月份"
		list="#{'1','2','3','4','5','6','7','8','9','10','11','12'}"
		name="leaveMonth" multiple="false" listKey="key" listValue="key" />月
	<s:textfield name="leaveDay" label="离开日" size="2"/>日
	<s:textfield name="leaveHour" label="离开小时" size="2"/>时
	<br/>
	<s:submit name="submit" value="添加"/>
</s:form>
</DIV>
</DIV>
</body>
</html>